auto delete old emails on CPanel

How to auto delete old emails on CPanel ?
Solution:
You need to set the cron by using cpanel >> cronjob and add the following command to run in cron.

/usr/bin/archivemail –quiet –delete –days 20 /home/{USER}/mail/inbox

By using above command you can delete the 20 days old emails . Make sure you replace {USER} with your actual cpanel username.
 
 
 

2 Thoughts to “auto delete old emails on CPanel”

  1. Thaks for sharing this. My inbox is flooding with lot of emails. Mostly automated emails as soon as the content is created. These emails should have been deleted. Your solution helped me. Thank you

    1. Hello Mahesh,
      Thanks for your comments

Leave a Comment